package demo1;

public class Text {
    // public static void main(String[] args) {
    //实例化：
//        Female female=new Female("小李",12,"重庆");
//
//            female.Fhobby();
//            female.text();


//        Female female=new Female();//调用了不带参数的构造方法
//        female.text();

    //      Female female=new Female();


    //1.直接赋值
//        Human human=new Female("梨花",10);
//        human.eat();
//}


        //2.方法传参
//    public static void func(Human human)
//    {
//
//    }
//        public static void main(String[] args) {
//            Female female=new Female("里哈",34);
//            func(female);
//        }
//
//
//}


//3.返回值
    public static Human func()
    {
        Female female=new Female("笑笑",17);
        return female;
    }
        public static void main(String[] args) {
           Human human=func();
        }

}
